package com.nuo.common.utils;

import java.util.Scanner;
import java.util.regex.Pattern;

/**
 * @description: TODO
 * @author nuo
 * @date 2022/11/18 0:23
 * @version 1.0
 */
public class PwdUtils {

    private static final String REGEX = "^\\w{6}$";
    // 必须包含数字和字母的匹配表达式
//    private static final String REGEX = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6}$";
    public static boolean isOk(String str) {
        return Pattern.matches(REGEX, str);
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (true) {
            System.out.println(isOk(scanner.next()));
        }
    }

}
